#include <stdio.h>

int
main(void)
{
    int n1, n2, n3, n4, n5, number;

    printf("Enter a number between 0 and 32767:\n");
    scanf("%d", &number);

    n5 = number % 8;
    n4 = (number / 8) % 8;
    n3 = (number / 64) % 8;
    n2 = (number / 512) % 8;
    n1 = (number / 4096) % 8;

    printf("In octal, your number is %d%d%d%d%d\n", n1, \
            n2, n3, n4, n5);

    return 0;
}
